﻿@model GameSchool.Models.NewsItem

<script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="/Content/CSS/newsform.css" />
@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>NewsItem</legend>

        @Html.HiddenFor(model => model.ID)

            <div class="editor-label">
            <h2>Titill:</h2>
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Title)
            @Html.ValidationMessageFor(model => model.Title)
        </div>

        <div class="editor-label">
            <h2>Innihald:</h2>
        </div>
           <div class="editor-field">
            @Html.TextAreaFor(model => model.Content, new { style = "width: 600px; height: 200px; resize: none;" })
            @Html.ValidationMessageFor(model => model.Content)
        </div>

        <div class="editor-label">
            @Html.HiddenFor(model => model.DatePub)
        </div>

        <div class="editor-label">
            @Html.HiddenFor(model => model.Author)
        </div>

        <div class="editor-label">
            @Html.HiddenFor(model => model.CourseID)
        </div>

        <p>
            <input type="submit" value="Vista breytingar" />
        </p>
    </fieldset>
}

